public class demo15 {
    public static void main(String[] args) {
        int[] ax = new int[100001];
        for (int i = 0; i < 1000; i++) {
            int mm = (int)(Math.random()*100001);
            ax[mm] += mm-(mm-1);
        }
        int aw = 0;
        for (int i =ax.length-1 ;i>=0 ; i--) {
            if (ax[i] !=0) {
                System.out.println("出现次数:"+ax[i] + "\t具体数值:"+(i-50000));
                aw++;
            }
            if (aw == 5){
                break;
            }
        }
    }
}
